<h2>DESCRIPTION</h2>

<em>d.polar</em> calculates and displays a polar diagram of an
angle raster map such as aspect, wind direction, or flow.
The input angle map orientation must be counter-clockwise (CCW)
from east, and the angle map units must be degrees. This refers
to the standard orientation of GRASS (e.g., see <em>r.slope.aspect</em>).
<p>The radius of the outer circle is defined by the total number
of pixels in the map. If the polar diagram does not reach the
outer circle, no data (NULL) pixels were found in the map.
<p>The vector in the diagram indicates a prevailing direction, its length
the strength of such direction. In case all angle vectors are oriented
along the same direction, the length for the vector is maximal (in fact 
it is equal to length of the most populated bin of the underlying histogram).
<p>As a side effect, the quality of the angle map can be derived from
the diagram. Strong spikes may indicate an over-representation of
the related angle(s) which happens in particular if integer maps
are used.

<h2>NOTES</h2>

If the <b>output</b> parameter is used, the diagram is generated
as EPS file. If the <b>-x</b> flag is used <em>xgraph</em> is launched.
Otherwise <em>d.polar</em> will use <em>d.graph</em> to draw the plot
in the current display frame.
<p>If <em>d.polar</em> is used on an aspect map generated by
<em>r.slope.aspect</em>, the <b>undef</b> parameter should be
set to 0 to distinguish NO DATA (NULL) areas from areas where
aspect is undefined (i.e. flat areas).
<p>
<center>
<img src="d_polar_aspect.png" alt="Polar diagram of aspect map">
<br>
<i>Polar diagram of aspect map</i>
</center>

<h2>EXAMPLE</h2>

In this example, the polar diagram of the 'aspect' angle map in the
North Carolina sample dataset location is generated:

<div class="code"><pre>
g.region raster=aspect -p
d.polar aspect
</pre></div>

<h2>SEE ALSO</h2>

<em>
<a href="d.graph.html">d.graph</a>,
<a href="d.histogram.html">d.histogram</a>,
<a href="d.rast.arrow.html">d.rast.arrow</a>,
<a href="r.slope.aspect.html">r.slope.aspect</a>
</em>


<h2>XGRAPH REQUIREMENT</h2>

<a href="http://www.xgraph.org">Xgraph</a> must be installed for the
<b>-x</b> flag to function.

<h2>REFERENCES</h2>

J. Hofierka, H. Mitasova, and M. Neteler (2009): Terrain parameterization in GRASS.
In T. Hengl and H.I. Reuter, editors, Geomorphometry: concepts, software, applications. Elsevier
(<a href="http://dx.doi.org/10.1016/S0166-2481(08)00017-2">DOI</a>)


<h2>AUTHORS</h2>

Markus Neteler, ITC-irst, Italy<br>
Bruno Caprile, ITC-irst, Italy<br>
Hamish Bowman, Otago University, New Zealand<br>

<!--
<p>
<i>Last changed: $Date$</i>
-->
